package com.hmdp;
public class Triangle {
    public static String determineType(int a, int b, int c) {
        // 检查无效输入
        if (a <= 0 || b <= 0 || c <= 0) {
            return "无效输入";
        }
        if (a + b <= c || a + c <= b || b + c <= a) {
            return "无效输入";
        }
        // 判断三角形类型
        if (a == b && b == c) {
            return "等边三角形";
        } else if (a == b || b == c || a == c) {
            return "等腰三角形";
        } else {
            return "普通三角形";
        }
    }
}